<template>
	<view>
		<view class="rule-box">
			<image class="rule-img" mode="widthFix" @click="showAgreement(5)" src="https://web.78keji.cn/images/youkuimg/guize.png">
			</image>
			<image class="rule-img" mode="widthFix" @click="telMobile" src="https://web.78keji.cn/images/youkuimg/kefu.png"></image>
			<image class="rule-img" mode="widthFix" @click="gotoQuanyi" src="https://web.78keji.cn/images/youkuimg/quanyi.png">
			</image>
		</view>
		<view v-if="isShowRule" class="rule-content-box">
			<image @click="isShowRule = false" class="rule-img" mode="widthFix" :src="baseImagePath + 'rule.png'">
			</image>
		</view>
		<uni-popup ref="popup" type="center" border-radius="10px 10px 10px 10px">
			<image mode="widthFix" :src="baseImagePath + 'quanyi-receive-img.png'"></image>
			<view class="close-receive-yindao" @click="closeReceiveYinDao">已知晓</view>
		</uni-popup>
	</view>
</template>

<script>
	import zfbUrlUtil from "../../utils/zfbUrlUtil";
	export default {
		data() {
			return {
				isShowRule: false,
			};
		},
		props: ['baseImagePath'],
		methods: {
		telMobile() {
			uni.makePhoneCall({
				phoneNumber: '4008825010'
			})
		},
		gotoQuanyi() {
			if(uni.getStorageSync('mobile')){
				my.navigateToMiniProgram({
				  appId: '2021004123656452', // 16 位
				  path: 'pages/yklq/yklq?mobile='+uni.getStorageSync('mobile'),
				
				  success: function (res) {
				    console.log(res);
				  },
				  fail: function (err) {
				    console.log(err);
				  }
				});
			}else{
				uni.showToast({
					title: '请先点击办理获取手机号',
					icon: "none"
				}); //弹出提示框
			}
		
		},
		showAgreement(value){
			this.$emit('showAgreement',value)
		}
		}
	}
</script>

<style lang="scss">
	.rule-box {
		position: fixed;
		top: 200rpx;
		right: 0;

		.rule-img {
			width: 52rpx;
			height: auto;
			margin-bottom: 20rpx;
			display: block;
		}
	}


	.rule-content-box {
		position: fixed;
		width: 100%;
		height: 100vh;
		left: 0;
		top: 0;
		overflow: auto;
		z-index: 9;

		.rule-img {
			width: 100%;
			height: auto;
		}
	}

	.close-receive-yindao {
		margin: 39rpx auto 0;
		text-align: center;
		width: 330rpx;
		height: 80rpx;
		line-height: 80rpx;
		background: #FFFFFF;
		border-radius: 40rpx;
		border: 1px solid #5B8CCF;
		font-family: PingFang SC;
		font-weight: bold;
		font-size: 28rpx;
		color: #183B7C;
	}
</style>
